package com.army.study.database;

import ohos.data.orm.OrmObject;
import ohos.data.orm.annotation.Entity;
import ohos.data.orm.annotation.PrimaryKey;

@Entity(tableName = "bus", ignoredColumns = {"checkBtn"}) //“ignoredColumns”表示该字段不需要添加到“bus”表的属性中
public class Bus extends OrmObject {

    @PrimaryKey()
    private Long id; // 主键ID
    private String busNum;  // 线路号 "987路"
    private String waitingStation; // 候车站 "海珠客运站"
    private String endStation; // 开往 "天安科技园"
    private int timeRemaining; // 离候车站剩下分钟 "10分钟"
    private int stationsRemaining;  // 离候车站剩下几站 "5站"
    private float kmRemaining; // 离候车站剩下距离 "1.5km"

    // 不用保存到数据库
    private String checkBtn; // 编辑卡片, 显示是否选择

    public Bus() {
    }

    public Bus(Long id, String busNum, String waitingStation, String endStation, int timeRemaining, int stationsRemaining, float kmRemaining) {
        this.id = id;
        this.busNum = busNum;
        this.waitingStation = waitingStation;
        this.endStation = endStation;
        this.timeRemaining = timeRemaining;
        this.stationsRemaining = stationsRemaining;
        this.kmRemaining = kmRemaining;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getBusNum() {
        return busNum;
    }

    public void setBusNum(String busNum) {
        this.busNum = busNum;
    }

    public String getWaitingStation() {
        return waitingStation;
    }

    public void setWaitingStation(String waitingStation) {
        this.waitingStation = waitingStation;
    }

    public String getEndStation() {
        return endStation;
    }

    public void setEndStation(String endStation) {
        this.endStation = endStation;
    }

    public int getTimeRemaining() {
        return timeRemaining;
    }

    public void setTimeRemaining(int timeRemaining) {
        this.timeRemaining = timeRemaining;
    }

    public int getStationsRemaining() {
        return stationsRemaining;
    }

    public void setStationsRemaining(int stationsRemaining) {
        this.stationsRemaining = stationsRemaining;
    }

    public float getKmRemaining() {
        return kmRemaining;
    }

    public void setKmRemaining(float kmRemaining) {
        this.kmRemaining = kmRemaining;
    }

    public String getCheckBtn() {
        return checkBtn;
    }

    public void setCheckBtn(String checkBtn) {
        this.checkBtn = checkBtn;
    }
}
